package com.ml.mall.service.notifation;

import com.ml.mall.bean.base.ApiRestResult;
import com.ml.mall.bean.req.notifation.NotifationEditDto;
import com.ml.mall.bean.req.notifation.NotifationNewDto;
import com.ml.mall.bean.req.notifation.NotifationQueryDto;
import com.ml.mall.bean.req.notifation.NotifationQueryOneDto;
import com.ml.mall.bean.res.notifation.NotifationQueryInfoRes;
import com.ml.mall.bean.res.notifation.NotifationQueryRes;
import com.ml.mall.entity.notifation.SysANotifation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.model.MailMessage;

import java.util.List;


public interface SysANotifationService extends IService<SysANotifation> {

    /**
     * @description    :分页查询通知
     * @author         :zxm
     * @date           :2021/5/18
    **/
    com.ml.mall.bean.page.Page<NotifationQueryRes> queryPageNotifation(NotifationQueryDto dto);

    /**
     * @description    :查询单个通知
     * @author         :zxm
     * @date           :2021/5/18
    **/
    NotifationQueryInfoRes queryOneNotifation(NotifationQueryOneDto dto);

    /**
     * @description    :新增通知
     * @author         :zxm
     * @date           :2021/5/18
    **/
    ApiRestResult createNotifation(NotifationNewDto dto);

    /**
     * @description    :修改通知
     * @author         :zxm
     * @date           :2021/5/18
    **/
    ApiRestResult editNotifation(NotifationEditDto dto);

    /**
     * @description    :删除通知
     * @author         :zxm
     * @date           :2021/5/18
    **/
    ApiRestResult delNotifation(List<Long> ids);


    /**
     * 通知管理员
     * @param mailMessage
     * @return
     */
    ApiRestResult notifyAdmin(MailMessage mailMessage);

    /**
     * 通知商户
     * @param mailMessage
     * @param companyId
     * @return
     */
    ApiRestResult notifyCompany(MailMessage mailMessage, Long companyId);
}
